package com.geostart.constructionland.system.service;


import com.geostar.constructionland.common.entity.logs.mongolog.LogMongoSpt;
import com.geostar.constructionland.common.entity.response.ExtJsAjaxResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "constructionland-analyse")
public interface LogMongoFeignClient {

    @RequestMapping(value = "/logMongo/queryAll", method = RequestMethod.POST)
    ExtJsAjaxResponse getMongoLog(@RequestParam("page") int pageNo, @RequestParam("limit") int pageNum
    );

    @RequestMapping(value = "/logMongo/add", method = RequestMethod.POST, consumes = "application/json")
    ExtJsAjaxResponse addMongoLog(@RequestBody LogMongoSpt logMongoSpt);

    @RequestMapping(value = "/logMongo/update", method = RequestMethod.POST, consumes = "application/json")
    ExtJsAjaxResponse updateMongoLog(@RequestBody LogMongoSpt logMongoSpt);

    @RequestMapping(value = "/logMongo/delete", method = RequestMethod.POST)
    ExtJsAjaxResponse deleteMongoLog(@RequestParam(value = "id") String id);

    @RequestMapping(value = "/logMongo/getMongoById",method = RequestMethod.GET)
    ExtJsAjaxResponse getMongoLogById(@RequestParam(value = "mongoId") String mongoId);
}
